package cn.model

import org.hibernate.validator.constraints.Length
import org.hibernate.validator.constraints.NotEmpty
import javax.validation.constraints.Max
import javax.validation.constraints.Min
import javax.validation.constraints.NotNull

//自动生成get set
data class Customer(val id: Int, val name: String, var address: String)

data class Person(
        @field:NotEmpty
        @field:Length(max = 100)
        var name: String,

        @field:NotNull
        @field:Min(0)
        @field:Max(120)
        var age: Int
)
